﻿<local:DocumentBase x:Class="WPFExcelReport.JLTSS"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
              
        xmlns:wep="clr-namespace:WPFExcelReport" 
       Background="White" 
         Loaded="Window_Loaded" 
     >
    <local:DocumentBase.Resources>
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}" >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="1*" />
        </Grid.RowDefinitions>

        <StackPanel Margin="0,0,0,0" Grid.Row="0" >
            <WrapPanel>
                <Label Content="操作日期从"  HorizontalAlignment="Left" Margin="10,5,0,0" Name="label3" VerticalAlignment="Top" Width="Auto" FontSize="14" />
                <DatePicker  HorizontalAlignment="Left" Margin="0,2,0,0" Name="FROM_DATE" VerticalAlignment="Top" Panel.ZIndex="4"
                                    SelectedDateChanged ="FROM_DATE_SelectedDateChanged" Width="103" />
                <Label Content="至"   HorizontalAlignment="Left" Margin="10,5,0,0" Name="label4" VerticalAlignment="Top" Width="Auto" FontSize="14" />
                <DatePicker  HorizontalAlignment="Left" Margin="0,2,0,0" Name="END_DATE" VerticalAlignment="Top" Panel.ZIndex="5"
                                    SelectedDateChanged ="END_DATE_SelectedDateChanged" Width="101" />
                <Button Content="查询"  Margin="5,0,0,0"  Name="btnQuery" Width="Auto" Panel.ZIndex="9"
                        Click="btnQuery_Click"/>
                <Button Content="导出"  Margin="5,0,0,0"  Name="btnEXCEL" Width="Auto" Panel.ZIndex="10"
                        Click="btnEXCEL_Click"/>
            </WrapPanel>
        </StackPanel>

        <DataGrid   Grid.Row="1" CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True" 
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"   
                  EnableColumnVirtualization="True"  
                  ScrollViewer.HorizontalScrollBarVisibility="Auto"
                  ScrollViewer.VerticalScrollBarVisibility="Auto"
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                               IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                               ItemsSource="{Binding}" x:Name="MasterDg" 
                               Grid.ColumnSpan="2" Margin="0,5,0,0" >
            <!--VKKSACHBE	NAME	INQTY	CUTQTY	SHIPQTY	STOCKQTY-->
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding Path=VKKSACHBE}" Header="业务员代号" Width="Auto" MinWidth="90" />
                <DataGridTextColumn Binding="{Binding Path=NAME}" Header="业务员" Width="Auto" MinWidth="70" />
                <DataGridTextColumn Binding="{Binding Path=INQTY}" Header="回收印染数" Width="Auto" MinWidth="50" />
                <DataGridTextColumn Binding="{Binding Path=CUTQTY}" Header="本厂取样" Width="Auto" MinWidth="50" />
                <DataGridTextColumn Binding="{Binding Path=SHIPQTY}" Header="客户取样" Width="Auto" MinWidth="50" />
                <DataGridTextColumn Binding="{Binding Path=STOCKQTY}" Header="结存" Width="Auto" MinWidth="50" />

            </DataGrid.Columns>
        </DataGrid  >


    </Grid>
</local:DocumentBase>
